<%@ page contentType="text/html; charset=UTF-8"%>
<%@ include file="/commons/taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<title></title>
		<style>
.a {
	display: block;
	margin-left: 10px;
}

.div {
	margin-left: 10px;
	text-align: left;
}

.div_t2 {
	
}

.left {
	text-align: left !important;
}

.l_add2 {
	background: url(${ctx}/images/index/l_add2.gif) no-repeat;
	padding-left: 15px;
}

.l_dec2 {
	background: url(${ctx}/images/index/l_dec2.gif) no-repeat;
	padding-left: 15px;
}

.font14 {
	font-size: 14px;
	font-weight: bold;
	color: #005C7B;
	background-color: #C8DDF0;
	text-align: left;
	text-indent: 10px;
	padding-top: 5px;
	border-bottom-width: 1px;
	border-bottom-style: solid;
	border-bottom-color: #94BDE2;
}

.bodysy {
	font-size: 12px;
	line-height: 20px;
	color: #333333;
}

.bodysy a {
	font-size: 12px;
	line-height: 20px;
	color: #333333;
	text-decoration: none;
}

.bodysy a:link {
	font-size: 12px;
	line-height: 20px;
	color: #333333;
	text-decoration: none;
}

.bodysy a:visited {
	font-size: 12px;
	line-height: 20px;
	color: #333333;
	text-decoration: none;
}

.float_l {
	float: left !important;
}

.float_r {
	float: right !important;
}

.bodysy a:hover {
	font-size: 12px;
	line-height: 20px;
	color: #333333;
	text-decoration: none;
	background-color: #C8DDF0;
}

.bodysy a:active {
	font-size: 12px;
	line-height: 20px;
	color: #333333;
	text-decoration: none;
}

.div090213 {
	line-height: 22px;
	border-bottom-width: 1px;
	border-bottom-style: dotted;
	border-bottom-color: #CCCCCC;
	clear: both;
}
</style>
		<link href="${ctx}/css/main/base.css" rel="stylesheet" type="text/css" />
		<link href="${ctx}/css/main/main.css" rel="stylesheet" type="text/css" />
	</head>
	<body class="bodysy">
		<form>
			<table width="98%" height="100%" border="0" cellpadding="0"
				cellspacing="0" class="tab_m">
				<tr>
					<td height="30" colspan="2" class="left">
						<s:iterator value="sysMenus" status="agent" id="r">
							<div class="div090213">
								<div class="div090213">
									<span class="float_l"> <img
											src="${ctx}/images/index/l_add2.gif"
											id="Iid<s:property value='#agent.index+1'/>"
											onclick="showSub('id<s:property value='#agent.index+1'/>');" />
										<img src="${ctx}/images/menu/${menuImage}.gif" /><span
										style="cursor: pointer;" href="#"
										onclick="showSub('id<s:property value='#agent.index+1'/>');">${menuName
											}</span> </span>
								</div>
								<div id="id<s:property value='#agent.index+1'/>"
									style="display: none;" class="div090213">
									<s:iterator value="#r.sysFuncs" status="user" id="u1">
										<div style="margin-left: 15px;" class="div090213">
											<div class="div090213">
												<span class="float_l"> <img
														src="${ctx}/images/index/l_add2.gif"
														id="Iid<s:property value='#agent.index+1'/><s:property value='#user.index+1'/>"
														onclick="showSub('id<s:property value='#agent.index+1'/><s:property value='#user.index+1'/>');" />
													<img src="${ctx}/images/menu/${menuImage}.gif" /> <s:if
														test="#u1.sysFuncs.size == 0">
														<input type="radio" id="func" name="func"
															value="${funcId}_${funcName}" />
													</s:if> <span style="cursor: pointer;" href="#"
													onclick="showSub('id<s:property value='#agent.index+1'/><s:property value='#user.index+1'/>');"><s:property
															value="funcName" /> </span> </span>
											</div>
											<div
												id="id<s:property value='#agent.index+1'/><s:property value='#user.index+1'/>"
												style="display: none" class="div090213">
												<s:iterator value="#u1.sysFuncs" status="user1" id="u2">
													<div style="margin-left: 18px;" class="div090213">
														<div class="div090213">
															<span class="float_l"> <img
																	src="${ctx}/images/index/l_add2.gif"
																	id="Iid<s:property value='#agent.index+1'/><s:property value='#user.index+1'/><s:property value='#user1.index+1'/>"
																	onclick="showSub('id<s:property value='#agent.index+1'/><s:property value='#user.index+1'/><s:property value='#user1.index+1'/>');" />
																<img src="${ctx}/images/menu/${menuImage}.gif" /> <s:if
																	test="#u2.sysFuncs.size == 0">
																	<input type="radio" id="func" name="func"
																		value="${funcId}_${funcName}" />
																</s:if> <span style="cursor: pointer;" href="#"
																onclick="showSub('id<s:property value='#agent.index+1'/><s:property value='#user.index+1'/><s:property value='#user1.index+1'/>');"><s:property
																		value="funcName" /> </span> </span>
														</div>
														<div
															id="id<s:property value='#agent.index+1'/><s:property value='#user.index+1'/><s:property value='#user1.index+1'/>"
															style="display: none" class="div090213">
															<s:iterator value="#u2.sysFuncs" status="user2" id="u3">
																<div style="margin-left: 21px;" class="div090213">
																	<span class="float_l"> <img
																			src="${ctx}/images/index/l_add2.gif"
																			id="Iid<s:property value='#agent.index+1'/><s:property value='#user.index+1'/><s:property value='#user1.index+1'/><s:property value='#user2.index+1'/>"
																			onclick="showSub('id<s:property value='#agent.index+1'/><s:property value='#user.index+1'/><s:property value='#user1.index+1'/><s:property value='#user2.index+1'/>');" />
																		<img src="${ctx}/images/menu/${menuImage}.gif" /> <s:if
																			test="#u3.sysFuncs.size == 0">
																			<input type="radio" id="func" name="func"
																				value="${funcId}_${funcName}" />
																		</s:if> <span style="cursor: pointer;" href="#"
																		onclick="showSub('id<s:property value='#agent.index+1'/><s:property value='#user.index+1'/><s:property value='#user1.index+1'/><s:property value='#user2.index+1'/>');"><s:property
																				value="funcName" /> </span> </span>
																	<div class="div090213"
																		id="id<s:property value='#agent.index+1'/><s:property value='#user.index+1'/><s:property value='#user1.index+1'/><s:property value='#user2.index+1'/>"
																		style="display: none">
																		<s:iterator value="#u3.sysFuncs" status="user3"
																			id="u4">
																			<div style="margin-left: 24px;" class="div090213">
																				<span class="float_l"> <img
																						src="${ctx}/images/index/l_add2.gif"
																						id="Iid<s:property value='#agent.index+1'/><s:property value='#user.index+1'/><s:property value='#user1.index+1'/><s:property value='#user2.index+1'/><s:property value='#user3.index+1'/>"
																						onclick="showSub('id<s:property value='#agent.index+1'/><s:property value='#user.index+1'/><s:property value='#user1.index+1'/><s:property value='#user2.index+1'/><s:property value='#user3.index+1'/>');" />
																					<img src="${ctx}/images/menu/${menuImage}.gif" />
																					<s:if test="#u4.sysFuncs.size == 0">
																						<input type="radio" id="func" name="func"
																							value="${funcId}_${funcName}" />
																					</s:if> <span style="cursor: pointer;" href="#"
																					onclick="showSub('id<s:property value='#agent.index+1'/><s:property value='#user.index+1'/><s:property value='#user1.index+1'/><s:property value='#user2.index+1'/><s:property value='#user3.index+1'/>');"><s:property
																							value="funcName" /> </span> </span>
																				<div class="div090213"
																					id="id<s:property value='#agent.index+1'/><s:property value='#user.index+1'/><s:property value='#user1.index+1'/><s:property value='#user2.index+1'/><s:property value='#user3.index+1'/>"
																					style="display: none">
																					<s:iterator value="#u4.sysFuncs" status="user4"
																						id="u5">
																						<div class="div090213" style="margin-left: 27px;">
																							<span class="float_l"> <img
																									src="${ctx}/images/index/l_add2.gif"
																									id="Iid<s:property value='#agent.index+1'/><s:property value='#user.index+1'/><s:property value='#user1.index+1'/><s:property value='#user2.index+1'/><s:property value='#user3.index+1'/><s:property value='#user4.index+1'/>"
																									onclick="showSub('id<s:property value='#agent.index+1'/><s:property value='#user.index+1'/><s:property value='#user1.index+1'/><s:property value='#user2.index+1'/><s:property value='#user3.index+1'/><s:property value='#user4.index+1'/>');" />
																								<img src="${ctx}/images/menu/${menuImage}.gif" />
																								<s:if test="#u5.sysFuncs.size == 0">
																									<input type="radio" id="func" name="func"
																										value="${funcId}_${funcName}" />
																								</s:if> <span style="cursor: pointer;" href="#"
																								onclick="showSub('id<s:property value='#agent.index+1'/><s:property value='#user.index+1'/><s:property value='#user1.index+1'/><s:property value='#user2.index+1'/><s:property value='#user3.index+1'/><s:property value='#user4.index+1'/>');"><s:property
																										value="funcName" /> </span> </span>
																					</s:iterator>
																				</div>
																			</div>
																		</s:iterator>
																	</div>
																</div>
															</s:iterator>
														</div>
													</div>
												</s:iterator>
											</div>
										</div>
									</s:iterator>
								</div>
							</div>
						</s:iterator>
					</td>
				</tr>
				<tr>
					<td>
						<input type="button" onclick="checkFunc();" value="确 定" />
					</td>
				</tr>
			</table>
		</form>
	</body>
</html>
<script>
function checkFunc(){

var id=document.getElementById('func');

var elm = document.forms[0].elements;

for(var i=0;i<elm.length;i++){

if(elm[i].checked == true){
var array=new Array();
	    
var ids1 = elm[i].value;
var ids = ids1.substring(0,ids1.indexOf('_'));
var names = ids1.substring(ids1.indexOf('_')+1,ids1.length);
      
array[0]=ids;
array[1]=names;

}

}
window.returnValue=array;
window.close();
	    
}


function showSub(id){
var obj=document.getElementById(id);

var img=document.getElementById("I"+id);
	if(obj.style.display=="block"){
		obj.style.display="none";
		img.src="${ctx}/images/index/l_add2.gif";
	}
	else{
		obj.style.display="block";
		img.src="${ctx}/images/index/l_dec2.gif"
	}
}
</script>